#pragma once
#include "Drawable.h"
#include "Physics.h"
#include "Ball.h"

class CBrick :
	public CDrawable
{
public:
	CBrick(CPhysics* pPhysics);
	~CBrick(void);

	int Draw();
	int Update();

	int SetPosition(double dX, double dY, double dZ);
	int Hit(CBall* pBall);

	int GetType() { return TYPE_BRICK; }
	int GetValue() { return m_iValue; }

	static void LoadTexture();

private:
	int m_iRemoveTimer;	//Timer that counts steps to destroy.
						//Body cannot be destroyed directly after hit, because ODE needs time
						//to respond.
	int m_iValue;		//points value for destroying
	static GLuint m_uiTexture;

	CBat* m_pBat;	//bat to which score will be added

};
